<html>
<head>
<title>The Criteria Menu</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td width="100%">
			<table width="100%" height="78" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="topnav">
			<tr>
				<!-- Header Side -->
				<td width="17">
					<img height="78" src="media/reportico100.png"/>
				</td>
				<td align="right"></td>
				<td align="center">
					<table width="100%" height="60" border="0" align="left" cellpadding="0" cellspacing="0">
						<tr>
							<td valign="top" align="left">
							<img src="media/repbanner.png"/></td>
							</td>
						</tr>
						<tr>
							<td align="center" valign="bottom" class="topmenucell">
								<nobr>
								&nbsp;
								</nobr>
							</td>
						</tr>
					</table>
				</td>
				<td width="103" class="toplogincell">
					&nbsp;
				</td>
			</tr>
			</table>
</td>
  </tr>
  <!--tr>
    <td class="header_top">reportico</td>
  </tr-->
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_reportico.html" class="menu">class tree: reportico</a> ]
		  [ <a href="../elementindex_reportico.html" class="menu">index: reportico</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../li_reportico.html">reportico</a><br />
            <br /><br />
		<b>Tutorials/Manuals:</b><br />
					<strong>Package-level:</strong>
							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.pkg.html">Reportico Tutorial And User Manual</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.manual.pkg.html">Reportico User Manual</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.quickstart.pkg.html">Reportico Installation</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.gettingstarted.pkg.html">Getting Started</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.structure.pkg.html">Reportico Installation Structure</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.using.pkg.html">Configuring Reportico - System Parameters</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.embedding.pkg.html">Embedding Reportico</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.security.pkg.html">Reportico Security</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.language.pkg.html">Language Support</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.projects.pkg.html">Projects</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.importlink.pkg.html">Importing and linking from reports</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.menus.pkg.html">Report Menus</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.prepare.pkg.html">Report Preparation and Execution</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.design.pkg.html">Report Design Mode</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.format.pkg.html">The Design Format Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.customcode.pkg.html">Custom Source Code</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.qrydet.pkg.html">The Query Details Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.assign.pkg.html">The Assignments Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.criteria.pkg.html">The Criteria Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.output.pkg.html">The Output Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.webservices.pkg.html">Turning Reports into Web Services (currently unavailable)</a>
</ul>
</li></ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.faq.pkg.html">Reportico FAQ</a>
</ul>
</li></ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.howto.pkg.html">Reportico Tutorial</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1.pkg.html">Tutorial No.1 - The Film Listing Report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_1.pkg.html">Tutorial 1 Stage 1 - Creating a basic report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_2.pkg.html">Tutorial 1 Stage 2 - Creating User Entry Criteria</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_3.pkg.html">Tutorial 1 Stage 3 - Working with expressions using assignments</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_4.pkg.html">Tutorial 1 Stage 4 - Working with groups</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_5.pkg.html">Tutorial 1 Stage 5 - Including database graphics into the report and generating drilldowns</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial2_1.pkg.html">Tutorial 2 - Creating the loan history report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial3_1.pkg.html">Tutorial 3 - The Monthly Returns Report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial4_1.pkg.html">Tutorial 4 - The Late Returns Summary report</a>
</ul>
</li></ul>
</li></ul>

							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.appendix1.pkg.html">Appendix 1 - Reportico Project Configuration parameters</a>
</ul>

							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.appendix2.pkg.html">Appendix 2 - Reportico URL request parameters</a>
</ul>

									                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../reportico/_reportico.php.html">		reportico.php
		</a><br>
	  </div><br />
      
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"../reportico/tutorial_reportico.assign.pkg.html">Prev</a></td>
<td width="80%" align="center" valign="bottom"></td>
<td width="10%" align="right" valign="bottom"><a href=
"../reportico/tutorial_reportico.output.pkg.html">Next</a></td>
</tr>
</table>
<span><a name="criteria_intro"></a><h2 class="title">The Criteria Menu</h2><a name="criteria_intro.critoverview"></a><h3 class="title">Criteria Menu Overview</h3><p>The Criteria Menu is where you set up the criteria that a user may
    choose for a report. For example, in a stock control database you may have
    a report that shows items that are currently in stock. For such a report,
    you may wish to be able to run the report for specified suppliers and/or
    specified products and/or specified product types and/or products that
    came into stock between a particular date range. These selections can only
    be made on the report by setting each one as a criteria item within this
    section.</p>

    <p>Each criteria item can operate in Expanded or Normal mode. When the
    report criteria screen is first displayed each criteria item is presented
    with a name and an input area that shows the users current selection. Each
    item here is in Normal mode and each one may be presented as an input
    field, a set of check boxes or with no ability for the user to enter
    criteria here. If an item is configured to expand then the Expand button
    (&gt;&gt;) appears alongside the criteria item. Pressing this provides
    entry of selection criteria for that item in the Expand pane on the right
    hand side. Where criteria items can be selected from a multi-selection
    list generated from database tables it is sensible to have this list
    presented in expand mode. In normal mode you may just summarise the user's
    selection or allow entry in a text box or use check boxes, list boxes and
    radio buttons where the selection list is small.</p><hr />

  <a name="criteria_intro.crittypes"></a><h3 class="title">Criteria Types and Criteria Display Types</h3><p>The Criteria Menu is where you set up the criteria that a user may
    choose for a report. For example, in a stock control database you may have
    a report that shows items that are currently in stock. For such a report,
    you may wish to be able to run the report for specified suppliers and/or
    specified products and/or specified product types and/or products that
    came into stock between a particular date range. These selections can only
    be made on the report by setting each one as a criteria item within this
    section.</p>

    <p>There are 5 types of criteria that may be presented to the
    user:-</p>

    <ol><li><p><strong>Text Field</strong></p>

        <p>User types in the criteria values into a text box at run-time and these values are then used
        within the main report query.</p></li>

      <li><p><strong>Database Lookup</strong></p>

        <p>User entry is selected from or validated against a list
        generated from the database. When setting up Database Lookup criteria items, it
        is necessary to provide the SQL that will provide the validation and
        selection list from the database. When running a report a Database Lookup
        criteria item can be selected by entering values into a text field or
        by selecting from list boxes, check boxes or radio buttons.</p></li>

      <li><p><strong>Date</strong></p>
        <p>Allows a date value to be prompted for in the report. 
        Dates are specified through a pop up date picker. 
    The format
	that dates appear in (e.g. dd/mm/yyyy) are specifed in a report project's configuration panel. Alternatively it can be manually 
	specified in the relevant project config.php file by changing the SW_PREP_DATEFORMAT value.</p></li>

      <li><p><strong>Date Range</strong></p>

        <p>Allows a date range to be prompted for in the report via a date picker.
    The format
	that dates appear in (e.g. dd/mm/yyyy) are specifed in a report project's configuration panel. Alternatively it can be manually 
	specified in the relevant project config.php file by changing the SW_PREP_DATEFORMAT value.</p></li>

      <li><p><strong>Custom List</strong></p>

        <p>A pre-determined list of values which can be presented during
        report criteria entry as text field, list box, check boxes or radio
        buttons. These predefined values are entered in the <strong>List</strong> Values
        attribute described below.</p></li></ol>

    <p>There are 7 ways a criteria item may be presented during criteria
    entry. A criteria item may also be presented differently when in Expand
    mode (the mode you enter when you press the Expand (&gt;&gt;) button for
    an item). These different display methods are :-</p>

    <ol><li><p>No Entry</p>

        <p>User is presented with current criteria selection but unable to
        modify. This is useful when you want the user to only select criteria from
        a list in expand mode only and only use the unexpanded criteria mode
        to display what the user selected in expand mode. Or it is useful
        where you wish to configure a default for the criteria entry that may
        not be modifiable by the user.</p></li>

      <li><p>Text Field</p>

        <p>Presents a text field where the user can type in the relevant
        criteria separated by commas.</p></li>

      <li><p>Drop Down List</p>

        <p>For Custom List or Database Lookup criteria types only. Presents the possible
        list of criteria values in a drop down single selection list box.</p></li>

      <li><p>Multiple Selection Listbox</p>

        <p>For Custom List or Database Lookup criteria types only. Presents the possible
        list of criteria values in a multiple selection list box. Useful when
        you wish to allow selection of multiple criteria values with use of
        the CTRL and SHIFT keys.</p></li>

      <li><p>Checkbox</p>

        <p>For Custom List or Database Lookup criteria types only. Presents the possible
        list of criteria values as a set of check boxes.</p></li>

      <li><p>Radio Button</p>

        <p>For Custom List or Database Lookup criteria types only. Presents the possible
        list of criteria values as a set of radio buttons. Useful when you
        wish to force entry of only value selection from the criteria
        list.</p></li>

      <li><p>Date Field (D/M/Y)</p>
        <p>All date criteria are entered via a date picker. This option is no longer relevant. For Date and Date Range criteria types only. Presents date
        selection as 3 list boxes from which user can select day, month and
        year.</p></li>
      <li><p>Date Field (M/D/Y)</p>
        <p>All date criteria are entered via a date picker. This option is no longer relevant. For Date and Date Range criteria types only. Presents date
        selection as 3 list boxes from which user can select month, day and
        year.</p></li>
      <li><p>Date Field (Y/M/D)</p>
        <p>All date criteria are entered via a date picker. This option is no longer relevant. For Date and Date Range criteria types only. Presents date
        selection as 3 list boxes from which user can select year, month and
        day.</p></li></ol><hr />

  <a name="criteria_intro.critlinking"></a><h3 class="title">Criteria Linking</h3><p>Lookup criteria Items can be linked together so that the list of
    values that the user selects from relates to another criteria selection. For
    example, if a set values for a country criteria item is selected, then a link
    can be set up that ensures when selecting from
    a city criteria, then only those cities belonging to the selected
    countries will be presented.</p>

    <p>This is performed by embedding an extra where clause that pulls in
    the relevant users choices from another criteria into the lookup SQL. This
    is done in the same way as bringing criteria into the main report query.
    See <a href="../reportico/tutorial_reportico.qrydet.pkg.html#qrydet.linkcrit">Linking in Criteria Values</a> for more details.</p><hr />

  <a name="criteria_intro.menu"></a><h3 class="title">The Criteria Menu</h3><p>Selecting the Criteria tab presents you with the existing criteria
    items, if any, and allows addition of more.</p>

    <p>To add a new criteria item, press the <strong>Add</strong> button. You will see a
    criteria button appear named <strong>CriteriaName</strong>. Click on this button and the
    <strong>Details</strong> sub tab menu appears. Change the name to something more meaningful
    as well as configuring the rest of the criteria item by filling in the
    attributes described below.</p>

    <p>To edit or view the attributes of an existing criteria item, click
    on the relevant criteria item button and then the <strong>Details</strong> sub tab menu that
    appears.</p><hr />
<span><a name="criteria_intro.criteria"></a><h2 class="title">The Criteria Item Details Pane</h2><p>This is where you set up the basic attributes of a criteria item
    that identify the type of item and how the item is presented and selected
    from. Also how the criteria is incorporated into the main query and any
    links to that criteria. Default values for the criteria can also be set
    here.</p>

    <a name="criteria.Name"></a><h3 class="title">Name</h3><p>The name of the criteria item. This is name used to reference this
      item when linking to it or incorporating it within the main report
      query. This is not the same as the criteria title.</p><hr />

    <a name="criteria.Title"></a><h3 class="title">Title</h3><p>This is the label displayed alongside the criteria item during
      report criteria entry.</p><hr />

    <a name="criteria.QueryColumnName"></a><h3 class="title">Main Query Column</h3><p>This is an easy way of linking the criteria selection to the main
      report query without having to specify the link in the main report query
      SQL using the &quot;[]&quot; notation. By filling in this value, when the report
      runs, the main SQL will be modified to link in this criteria item by
      adding a line to the where clause something like &quot;AND table.column IN
      ({criteriavalues})&quot; where table.column is the value entered in this
      field and {criteriavalues} are the users selected values that relate to
      the Return Column described below.</p>

      <p>If this value is not filled in then the main query must be
      modified to reference the criteria item using &quot;[]&quot; notation.</p><hr />

    <a name="criteria.CriteriaType"></a><h3 class="title">Criteria Type</h3><p>Indicates the behaviour of the criteria item. The criteria types
      of Text Field, Database Lookup, Date, Date Range and Custom List are described
      above.</p><hr />

    <a name="criteria.CriteriaDisplay"></a><h3 class="title">Criteria Display</h3><p>Indicates how the criteria item is presented to the user in Normal
      mode when selecting criteria on the left hand side of the report
      criteria entry screen. This values identifies whether the criteria
      should be selected via list box, check box etc. The valid values of
      No Entry,Text Field,Drop Down List,Multiple Selection Listbox,Checkbox,Radio Button and Date Fields are
      described above.</p><hr />

    <a name="criteria.ExpandDisplay"></a><h3 class="title">Expand Display</h3><p>Indicates how the criteria item is presented to the user in Expand
      mode when selecting criteria on the right hand side of the report
      criteria entry screen. This values identifies whether the criteria
      should be selected via list box, check box etc. The valid values of
      No Entry,Text Field,Drop Down List,Multiple Selection Listbox,Checkbox,Radio Button and Date Fields are
      described above.</p><hr />

    <a name="criteria.ReturnColumn"></a><h3 class="title">Return Column</h3><p>Relates to Database Lookup criteria types only and is only available once a
      criteria SQL query has been made in the SQL sub tab. It is the name of
      the column from the criteria SQL whose values are used by the main report
      query in order to generate report output that matches the user's
      selection for this criteria.</p>

      <p>For example, in the case of a <strong class = "bold">country</strong> criteria that selects both <strong class = "bold">country_code</strong> and <strong class = "bold">country_name</strong> from the country table, you probably
      want to use the <strong class = "bold">country_code</strong> values to
      link in with main report query (and use <strong class = "bold">country_name</strong> as the column which the user selects
      from). In this case the <strong class = "bold">country_code</strong>
      column should be selected here.</p>

      <p>See the start of this page for details of how criteria works within Reportico.</p><hr />

    <a name="criteria.DisplayColumn"></a><h3 class="title">Display Column</h3><p>Relates to Database Lookup criteria types only and is only available once a
      criteria SQL query has been made in the SQL sub tab. It is the name of a
      column from either the criteria SQL or created as an assignment column
      whose values are used to populate selection list boxes, check boxes,
      radio buttons that the user may select from.</p><hr />

    <a name="criteria.OverviewColumn"></a><h3 class="title">Overview Column</h3><p>Relates to Database Lookup criteria types only and is only available once a
      criteria SQL query has been made in the SQL sub tab. It is the name of a
      column from either the criteria SQL or created as an assignment column
      whose values are used to summarise the user's selection in Normal
      mode.</p>

      <p>For example, in the case of a <strong class = "bold">country</strong> criteria that selects both <strong class = "bold">country_code</strong> and <strong class = "bold">country_name</strong> from the country table, you may wish
      the full country name to be selected from in Expand mode, but country
      codes to be displayed or entered in the summary box in Normal mode. If
      this is the case then, <strong class = "bold">country_code</strong>
      should be chosen.</p><hr />

    <a name="criteria.MatchColumn"></a><h3 class="title">Match Column</h3><p>Relates to <strong>Database Lookup</strong> criteria types only and is only available once a
      criteria SQL query has been made in the SQL sub tab. It is the name of a
      column from either the criteria SQL or created as an assignment column
      whose values are compared with the user's search string in expand
      mode when the <strong>Search</strong> option is used.</p><hr />

    <a name="criteria.CriteriaDefaults"></a><h3 class="title">Defaults</h3><p>Provides default selection values for this criteria item that are
      already selected when the report criteria screen first displays. These
      must be values that relate to the Return Column described above.</p>

      <p>For Text Field,Database Lookup and Custom List types then this can be populated
      with comma separated values.</p>

      <p>For Date types a single date value can be entered or more useful
      codes as follows:-</p>

      <ol><li><p>TODAY - defaults to today's date</p></li>

        <li><p>YESTERDAY - defaults to yesterday's date</p></li>

        <li><p>TOMORROW - defaults to tomorrow's date</p></li>

        <li><p>FIRSTOFMONTH - defaults to the date of the first day of this
          month</p></li>

        <li><p>LASTOFMONTH - defaults to the date of the last day of this
          month</p></li>

        <li><p>FIRSTOFLASTMONTH - defaults to the date of the first day of
          last month</p></li>

        <li><p>LASTOFLASTMONTH - defaults to the date of the last day of last
          month</p></li>

        <li><p>FIRSTOFYEAR - defaults to the date of the first day of this
          year</p></li>

        <li><p>LASTOFYEAR - defaults to the date of the last day of this
          year</p></li>

        <li><p>FIRSTOFLASTYEAR - defaults to the date of the first day of
          last year</p></li>

        <li><p>LASTOFLASTYEAR - defaults to the date of the last day of last
          year</p></li>

        <li><p>STARTOFWEEK - defaults to the first day of this week</p></li>
        <li><p>ENDOFWEEK - defaults to the end day of this week</p></li>
        <li><p>STARTOFLASTWEEK - defaults to the first day of last week</p></li>
        <li><p>ENDOFLASTWEEK - defaults to the end day of last week</p></li></ol>

      <p>For Date Range types, the lower and upper range values can be
      specified with a separating hyphen (&quot;-&quot;). So to default a Date Range
      criteria item to last month, you should enter <strong class = "bold">FIRSTOFLASTMONTH-LASTOFLASTMONTH.</strong></p><hr />

    <a name="criteria.CriteriaList"></a><h3 class="title">List Values</h3><p>For Custom List criteria items only. Provides the values that the user
      can select from and the values that will be used in the report query
      when generating the report data to match the query. The values should be
      entered as comma delimited values each consisting of a query value and a
      display value separated by commas.</p>

      <p>So for example, if you entered a value of
      Gold=G,Yellow=Y,Blue=B,Lime Green=L,Red=R then user will be able to
      select from a list comprising &quot;Gold&quot;, &quot;Yellow&quot;, &quot;Blue&quot;, &quot;Lime Green&quot; and
      &quot;Red&quot; but it is the keys of G,Y,B,L and R that are used in the main
      query.</p>
      <p>If you wanted to default this criteria item to Gold and Blue, you would enter <strong>G,B</strong> against the <strong>Defaults</strong> parameter.</p><hr /></span></span>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="../reportico/tutorial_reportico.assign.pkg.html">Prev</a></td>
<td width="34%" align="center" valign="top"><a href=
"../reportico/tutorial_reportico.design.pkg.html">Up</a></td>
<td width="33%" align="right" valign="top"><a href=
"../reportico/tutorial_reportico.output.pkg.html">Next</a></td>
</tr>

<tr>
<td width="33%" align="left" valign="top">The Assignments Menu</td>
<td width="34%" align="center" valign="top">Report Design Mode</td>
<td width="33%" align="right" valign="top">The Output Menu</td>
</tr>
</table>
        <div class="credit">
		    <hr />
		    Documentation generated on Mon, 09 Jun 2014 18:10:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>